package com.example.work4.view

import android.graphics.Color
import android.view.View
import android.view.Window
import android.view.WindowManager

object StatusBar {
    public fun setStatusBarAsBlue(window:Window) {
        val window = window
        window.navigationBarColor =Color.WHITE ;
        val decorView = window.decorView
        val option = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                or View.SYSTEM_UI_FLAG_LAYOUT_STABLE)
        decorView.systemUiVisibility = option
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
        window.statusBarColor = Color.TRANSPARENT
    }

    public fun setStatusBarAsBlack(window:Window) {
        val window = window
        window.navigationBarColor =Color.BLACK ;
        val decorView = window.decorView
        val option = (View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN
                or View.SYSTEM_UI_FLAG_LAYOUT_STABLE)
        decorView.systemUiVisibility = option
        window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS)
        window.statusBarColor = Color.BLACK
    }
}